﻿@model IEnumerable<Himall.Web.Areas.Admin.Models.HomeFloor>
<link href="~/Content/bootstrap-switch.min.css" rel="stylesheet" />
<script src="~/Scripts/bootstrap-switch.min.js"></script>
<script src="~/Areas/Admin/Scripts/pageSettings-floor.js"></script>

<div class="container">
    <ul class="nav nav-tabs-custom clearfix">
        <strong>楼层编辑</strong>
        <li class="active"><a>管理</a></li>
        <li><a href="@Url.Action("AddHomeFloorDetail", "PageSettings", new { area = "Admin" })">新增楼层一</a></li>
        <li><a href="@Url.Action("AddHomeFloorDetail2", "PageSettings", new { area = "Admin" })">新增楼层二</a></li>
    </ul>
    <table class="table mt20">
        <thead>
            <tr>
                <th>楼层名称</th>
                <th>楼层类型</th>
                <th>排序</th>
                <th></th>
                <th class="td-operate">操作</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var floor in Model)
            {
                <tr rownumber="@floor.DisplaySequence" floorId="@floor.Id">
                    <td>@floor.Name</td>
                    <td>@if(floor.StyleLevel == 0) { <text>楼层一</text>}else{<text>楼层二</text>}</td>
                    <td width="100px"><span class="glyphicon glyphicon-circle-arrow-up"></span> <span class="glyphicon glyphicon-circle-arrow-down"></span></td>
                    <td width="120px" align="center"><div class="switch switch-mini"><input class="bootstrapSwitch" type="checkbox" data-size="mini" data-on-text="开启" data-off-text="关闭" @(floor.Enable ? "checked" : "") /></div></td>
                    <td class="td-operate"><span class="btn-a">
                        @if( floor.StyleLevel == 0 )
                        {
                            <a href="AddHomeFloorDetail?id=@floor.Id">编辑</a>
                        }
                        else
                        {
                            <a href="AddHomeFloorDetail2?id=@floor.Id">编辑</a>
                        }
                        <a onclick="deleteFloor(@floor.Id,'@floor.Name')">删除</a></span></td>
                </tr>
            }
        </tbody>
    </table>
</div>
